/* 1. Added Variables so colors and spacing actually work */
:root {
  --ebhro3-primary: #0a1128;
  --ebhro3-secondary: #e4880f;
  --ebhro3-white: #ffffff;

  --ebhro3-space-xs: 10px;
  --ebhro3-space-sm: 20px;
  --ebhro3-space-md: 40px;
  --ebhro3-space-lg: 30px;
  --ebhro3-space-xl: 50px;

  --ebhro3-container-width: 1200px;
  --ebhro3-fs-md: 1.1rem;
  --ebhro3-fs-lg: 1.2rem;
  --ebhro3-br-lg: 15px;
}

/* 2. Added position: relative and z-index to fix the overlay */
.ebhro3-hero {
  position: relative; /* REQUIRED for the ::before overlay */
  z-index: 1; /* Keeps content above overlay */
  display: flex;
  align-items: center;
  justify-content: center;
  background: url("/img/hero-image.webp");
  background-repeat: no-repeat;
  background-size: cover;
  background-position: left center;
  padding-block: var(--ebhro3-space-md);
  width: 100%;
}

.ebhro3-hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(10, 17, 40, 0.7);
  z-index: -1; /* Places it behind the text but above the background image */
}

/* Rest of your layout CSS */
.ebhro3-container {
  max-width: var(--ebhro3-container-width);
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  margin: 0 auto;
}

.ebhro3-content {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--ebhro3-space-xl);
  align-items: center;
  justify-content: center;
  padding-inline: var(--ebhro3-space-sm);
}

.ebhro3-text-block {
  display: flex;
  align-items: start;
  justify-content: center;
  flex-direction: column;
  gap: var(--ebhro3-space-lg);
}

.ebhro3-title {
  font-size: clamp(1.5rem, 2vw, 3rem);
  font-weight: clamp(600, 2vw, 900);
  color: var(--ebhro3-white);
  margin: 0;
}

.ebhro3-title span {
  color: var(--ebhro3-secondary);
}

.ebhro3-description {
  font-size: clamp(var(--ebhro3-fs-md), 1.5vw, 1.4rem);
  color: var(--ebhro3-white);
  max-width: 520px;
  line-height: 1.6;
}

.ebhro3-list {
  display: flex;
  flex-direction: column;
  gap: var(--ebhro3-space-xs);
  padding-right: var(--ebhro3-space-lg); /* Assuming RTL layout */
  font-weight: clamp(500, 2vw, 700);
  color: var(--ebhro3-white);
}

.ebhro3-list-item {
  font-size: var(--ebhro3-fs-lg);
}

/* Image styling */
.ebhro3-image-block {
  margin: 0 auto;
  display: flex;
  justify-content: center;
  position: relative;
}

.ebhro3-image-wrapper {
  position: relative;
}

.ebhro3-image {
  width: 100%;
  max-width: 420px;
  border-radius: var(--ebhro3-br-lg);
  animation: ebhro3-floating 4s ease-in-out infinite;
}

@keyframes ebhro3-floating {
  0% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-14px);
  }
  100% {
    transform: translateY(0);
  }
}

.ebhro3-floating-circle {
  position: absolute;
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background: var(--ebhro3-secondary);
  opacity: 0.25;
  top: -40px;
  left: 0px;
  animation: ebhro3-rotate 18s linear infinite;
}

.ebhro3-floating-reverse {
  bottom: -10px;
  right: 5px;
  top: auto;
  left: auto;
  animation-direction: reverse;
}

@keyframes ebhro3-rotate {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* Subtitle styling */
.ebhro3-subtitle {
  display: inline-block;
  width: fit-content;
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 5px;
  padding: 10px 30px;
  color: #fff;
  background: linear-gradient(135deg, #e4880f 0%, #d46b1a 100%);
  border-radius: 50px;
  border: 2px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 4px 15px rgba(246, 131, 34, 0.3);
  line-height: 1.5;
  transition: all 0.3s ease;
  animation: fadeInUp 0.8s ease-out forwards;
}

.ebhro3-subtitle:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(246, 131, 34, 0.4);
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 3. Button animations (Linked successfully to HTML classes now) */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background-color: var(--ebhro3-primary);
  color: var(--ebhro3-white);
  padding: 14px 35px;
  text-decoration: none;
  font-size: 14px;
  font-weight: bold;
  border-radius: 50px;
  overflow: hidden;
  z-index: 1;
  transition: color 0.5s ease-in-out;
  border: 2px solid var(--ebhro3-primary);
}

.btn.up::before,
.btn.up::after {
  content: "";
  display: block;
  width: 50px;
  height: 50px;
  position: absolute;
  border-radius: 50%;
  z-index: -1;
  background-color: var(--ebhro3-white);
  transition: all 0.6s ease-in-out;
}

.btn.up::before {
  top: -1em;
  left: -2em;
  transform: translate(-50%, -50%);
}

.btn.up::after {
  left: calc(100% + 2em);
  top: calc(100% + 1em);
  transform: translate(-50%, -50%);
}

.btn.up:hover {
  color: var(--ebhro3-primary);
}

.btn.up:hover::before,
.btn.up:hover::after {
  height: 450px;
  width: 450px;
}

.btn.up:active {
  transform: scale(0.95);
}

/* Responsiveness */
@media (max-width: 768px) {
  .ebhro3-content {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .ebhro3-text-block {
    align-items: center;
  }

  .ebhro3-list {
    padding-right: 0;
    text-align: right;
  }

  .ebhro3-subtitle {
    font-size: 0.9rem;
    padding: 8px 20px;
  }
}

.btn.white {
  background-color: var(--ebhro3-white);
  color: var(--ebhro3-primary);
  border-color: var(--ebhro3-primary);
}

.btn.white:hover {
  background-color: var(--ebhro3-primary);
  color: var(--ebhro3-white) !important;
}
